-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-4169] [Core] Accommodate non-English Locales in unit tests #3036
Conversation
Can one of the admins verify this patch? |
@@ -1683,7 +1683,7 @@ private[spark] object Utils extends Logging { | |||
def isBindCollision(exception: Throwable): Boolean = { | |||
exception match { | |||
case e: BindException => | |||
if (e.getMessage != null && e.getMessage.contains("Address already in use")) { | |||
if (e.getMessage != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's hacky to depend on the exact message. I suppose this will now trigger on any BindException
with a message, which could include things like invalid port or other failure. But maybe that's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's probably not a whole lot of harm in a false-positive here, since I think we limit the number of retries and will eventually fail.
Jenkins, this is ok to test. |
Test build #23085 has started for PR 3036 at commit
|
Test build #23085 has finished for PR 3036 at commit
|
Test PASSed. |
/cc @andrewor14 Any thoughts here? Some other users have started hitting this, too, so I think this is a high priority patch to merge. |
This doesn't just affect unit tests, which is why it's important: http://issues.apache.org/jira/browse/SPARK-4316 |
The reason why it searches for the specific message is that we want to isolate the specific kind of |
Ok LGTM I'm merging this into master, 1.2 and 1.1 |
Hey @numbnut do you have a JIRA account? |
For me the core tests failed because there are two locale dependent parts in the code. Look at the Jira ticket for details. Why is it necessary to check the exception message in isBindCollision in https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L1686 ? Author: Niklas Wilcke <[email protected]> Closes #3036 from numbnut/core-test-fix and squashes the following commits: 1fb0d04 [Niklas Wilcke] Fixing locale dependend code and tests (cherry picked from commit ed8bf1e) Signed-off-by: Andrew Or <[email protected]>
For me the core tests failed because there are two locale dependent parts in the code. Look at the Jira ticket for details. Why is it necessary to check the exception message in isBindCollision in https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L1686 ? Author: Niklas Wilcke <[email protected]> Closes #3036 from numbnut/core-test-fix and squashes the following commits: 1fb0d04 [Niklas Wilcke] Fixing locale dependend code and tests (cherry picked from commit ed8bf1e) Signed-off-by: Andrew Or <[email protected]>
Yes I have a JIRA account. My name at JIRA is also numbnut. Why are you asking? |
@numbnut (Just so you can get the credit in JIRA.) |
Ahh ok. Thank you! |
For me the core tests failed because there are two locale dependent parts in the code.
Look at the Jira ticket for details.
Why is it necessary to check the exception message in isBindCollision in
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L1686
?